import http from '../http'

export async function getList(params: any) {
  const req = await http({
    path: '/dev-api/oa/asset/listall',
    method: 'GET',
    params
  })
  return req.rows
}
export async function add(params: any) {
  const req = await http({
    path: '/dev-api/oa/asset',
    method: 'post',
    params
  })
  return req
}
export async function deleteById(id: any) {
  const req = await http({
    path: `/dev-api/oa/asset/${id}`,
    method: 'delete',
    params: {}
  })
  return req
}

export async function update(params: any) {
  const req = await http({
    path: '/dev-api/oa/asset',
    method: 'put',
    params
  })
  return req
}